package zozopo.manual.operations;

import java.sql.Connection;

import zozopo.database.BusiDatabaseManager;
import zozopo.operations.comm.OperatingService;

public class PollOS extends OperatingService{
	public PollOS(Connection conn){
		super(conn);
		
	}
	
	public PollOS(){
		this.databaseConnection = new BusiDatabaseManager();
		this.conn = databaseConnection.getConnection();
	}
	
	public boolean poll(String field,int id){
		String sql = "update "+PollTB.TABLE_NAME+" set " +field + " = " + field + "+1 where "+ PollTB.ID_POLL + " = " +id;
		return databaseConnection.executeUpdate(conn, sql);
	}
}
